public class Rect extends Shape {

  private int x,y;
  private double area,length;

  public Rect(int x , int y){
    this.x = x;
    this.y = y;
  }

  public void printArea(){
    area = x*y;
    System.out.println("Rect printArea" + area);
  }

  public void printLength(){
    length = 2*(x+y);
    System.out.println("Rect printLength" + length);
  }

}